package com.baoleme.exceptions.enumeration;


import lombok.Getter;

/*请求代码枚举类*/
@Getter
public enum ResponseEnum {

    SUCCESS(20000,"请求成功"),

    INVALID_ACCOUNT(40001,"账户名或密码错误"),
    INVALID_TOKEN(40002,"用户token过期"),
    ILLEGAL_OPERATION(40003,"非法操作"),
    ERROR_OLD_PASSWORD(40004,"旧密码不正确"),
    ERROR_DISABLED_ACCOUNT(40005,"该账号被禁用"),
    DUPLICATE_DATA(40006, "数据重复"),
    TOKEN_MISSING(40007, "token丢失"),

    ORDER_NOT_FOUND(50001,"订单不存在"),
    NO_HISTORY_ORDER(50002,"无历史订单"),
    EMPTY_SHOPPING_CART(50003,"购物车为空"),
    INVALID_PARAM(50004, "无效的参数"),

    SET_MEAL_STILL_IN_SALE(60001,"套餐在售，不能删除"),

    ERROR(-1,"未知错误");

    /**
     * 状态码
     */
    private final Integer code;
    /**
     * 提示信息
     */
    private final String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
